// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

const { ccclass, property } = cc._decorator;

@ccclass
export default class GameUI extends cc.Component {
  /**单例 */
  public static instance: GameUI;

  @property({ type: cc.Node, displayName: "主角节点" })
  hero: cc.Node = null;

  onLoad() {
    GameUI.instance = this;
  }

  start() {}

  update(dt) {}

  /**主角开始移动 */
  directMove(curAngle: number = 0, vector): void {
    this.hero.directMove(curAngle, vector);
  }

  /**主角停止移动 */
  stopRocker() {
    this.hero.stopMove();
  }
  /**清理指引 */
  public clear() {
    // this._guildTime = Date.now();
    // Tween.removeTweens(this.handImg.node);
    // this.handImg.node.active = false;
    // this.guildeImg.active = false;
  }
}
